﻿@model NavKet.Models.Mall
@using NavKet.Models
@{

    ViewBag.Title = "Index";
    Layout = "~/Views/Admin/AdminMasterPage.cshtml";
}
<h2>
    Index</h2>
<form method="post"  enctype="multipart/form-data" action="/MallAdmin/Index/@Model.id" >
<table border="0" cellpadding="0" cellspacing="0" id="id-form">
    <tr>
        <th valign="top">
            Mall name:
        </th>
        <td>
            <input type="text" name="txtMallName" class="inp-form" value="@Model.name" />
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <th valign="top">
            Street name:
        </th>
        <td>
            <input type="text" name="txtStreetName" class="inp-form" value="@Model.street" />
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <th valign="top">
            Quadrate :
        </th>
        <td>
            <select name="quadrate">
                @foreach (Quadrate item in ViewBag.qudrates)
                {
                    if (Model.quadrateId == item.id)
                    {
                    <option selected="selected" value="@item.id">@item.name</option>     
                    }
                    else
                    {
                    <option value="@item.id">@item.name</option>     
                    }
                }
            </select>
        </td>
    </tr>
</table>
<input type="submit" class="form-submit" value="">
<!--  start mall Phones-table ..................................................................................... -->
<h1>
    Mall phones</h1>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
    <tr>
        <th class="table-header-repeat line-left minwidth-1">
            <a href="">Type </a>
        </th>
        <th class="table-header-repeat line-left minwidth-1">
            <a href="">Number </a>
        </th>
        <th class="table-header-options line-left">
            <a href="">Options</a>
        </th>
    </tr>
    @foreach (MallPhone item in ViewBag.MallPhones)
    {
        <tr>
            <td>
                @switch (@item.type)
                {
                    case "A":
                    <h1>
                        phone
                    </h1>
                        break;
                    case "B":
                    <h1>
                        mobile
                    </h1>
                        break;
                    case "C":
                    <h1>
                        Fax
                    </h1>
                        break;
                    default:
                        break;
                }
            </td>
            <td>
                <h1>
                    @item.PhoneNumber</h1>
            </td>
            <td class="options-width">
                <a href="/MallAdmin/AddMallPhone?mallId=@item.MallId" title="Add" class="icon-1 info-tooltip">
                <a href="/MallAdmin/EditMallPhone/@item.id?mallId=@item.MallId" title="Edit" class="icon-1 info-tooltip">
                    <a href="/MallAdmin/DeletMallPhone/@item.id?mallId=@item.MallId" title="Delete" class="icon-2 info-tooltip">
                    </a>
            </td>
        </tr>
    }
</table>
<!--  end MallPhones-table................................... -->
<!--  start mall News-table ..................................................................................... -->
<h1>
    Mall news</h1>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
    <tr>
        <th class="table-header-repeat line-left minwidth-1">
            <a href="">Title</a>
        </th>
        <th class="table-header-repeat line-left minwidth-1">
            <a href="">Content</a>
        </th>
        <th class="table-header-options line-left">
            <a href="">Options</a>
        </th>
    </tr>
    @foreach (MallNew item in ViewBag.Mallnews)
    {
        <tr>
            <td>
                <h1>
                    @item.title
                </h1>
            </td>
            <td>
                <h1>
                    @item.newsContent</h1>
            </td>
            <td class="options-width">
                <a href="/MallAdmin/AddMallNews?mallId=@item.MallId" title="Add" class="icon-1 info-tooltip">
                <a href="/MallAdmin/EditMallNews/@item.id?mallId=@item.MallId" title="Edit" class="icon-1 info-tooltip">
                    <a href="/MallAdmin/DeleteMallNews/@item.id?mallId=@item.MallId" title="Delete" class="icon-2 info-tooltip">
                    </a>
            </td>
        </tr>
    }
</table>
<!--  end mall News-table................................... -->

<!--  start image-table ..................................................................................... -->
<h1>Images</h1>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
    <tr>
        <th class="table-header-repeat line-left minwidth-1">
            <a href="">Image Name</a>
        </th>
        <th class="table-header-options line-left">
            <a href="">Options</a>
        </th>
    </tr>
    @foreach (MallImage item in ViewBag.MallImages)
    {
        <tr>
            <td>
                <img width="50px" height="50px" src="/Content/pics/@item.ImageName" />
            </td>
            <td class="options-width">
                <a href="/MallAdmin/DeleteShopImage/@item.ImageName?mallId=@Model.id" title="Delete" class="icon-2 info-tooltip">
                </a>
            </td>
        </tr>
    }
    <tr>
       
        <td>
            <input type="file" name="uploader" />
        </td>
        <td>
            <div class="bubble-left">
            </div>
            <div class="bubble-inner">
                JPEG, GIF 5MB max per image</div>
            <div class="bubble-right">
            </div>
        </td>
    </tr>
</table>
<!--  end shopImages-table................................... -->
</form>
